const Router = require('koa-router')
const { getWeather, saveArticle, ArticleType, Upload, ArticleColumn, getArticle,
    createArticleColumn, givePraiseArticle, getPraiseArticle, saveBook, getBookList, saveBookVisitNum,getBookTop } = require('../controller/client.controller')

const router = new Router({ prefix: '/client' })
// 获取天气接口
router.get('/weather', getWeather)
// 保存文章
router.post('/saveArticle', saveArticle)
// 文章分类
router.get('/ArticleType', ArticleType)
// 上传
router.post('/Upload', Upload)
// 获得专栏栏目
router.get('/ArticleColumn', ArticleColumn)
// 创建专栏栏目
router.post('/createArticleColumn', createArticleColumn)
// 
router.get('/getArticle', getArticle)
//我点赞的文章
router.get('/givePraiseArticle', givePraiseArticle)
// 点赞我的文章
router.get('/getPraiseArticle', getPraiseArticle)

// 图书分享 保存
router.post('/saveBook', saveBook)
// 获取图书列表
router.get('/getBookList', getBookList)
// 图书访问量 保存
router.post('/saveBookVisitNum', saveBookVisitNum)

router.get('/getBookTop',getBookTop)



// 导出
module.exports = router